/**
 * 
 */
package it.sd.pwframework.persistence.common;

import java.io.Serializable;
import java.util.Date;


public class Pagination implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer page = 0;
	
	private Date date = null;

	private Integer itemXpage = 10;
	
	public Pagination() {
		super();
	}

	
	public Pagination(Integer page, Integer itemXpage) {
		this(page, itemXpage, null);
	}


	public Pagination(Integer page, Integer itemXpage, Date date) {
		super();
		if (page < 0) {
			page = 0;
		}
		if (itemXpage <= 0) {
			itemXpage = 10;
		}
		this.page = page;
		this.itemXpage = itemXpage;
		this.date = date;
	}

	/**
	 * @return the page
	 */
	public Integer getPage() {
		return page;
	}

	/**
	 * @return the itemXpage
	 */
	public Integer getItemXpage() {
		return itemXpage;
	}

	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}
}
